<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript">
	document.addEventListener("DOMContentLoaded", function(){
		/*
		var xhr = new window.XMLHttpRequest();
		xhr.onreadystatechange = function(){
			if(xhr.readyState == 4 && xhr.status == 200){
				var txt = xhr.responseText;
				alert(txt);
			}	
		}
		xhr.open("GET", "../rest/contacts", true);
		xhr.setRequestHeader("Accept", "application/json");
		xhr.send(null);
		*/
		$.ajax({
			url : '../rest/contacts',
			type : 'GET',
			dataType : 'json',
			//contentType:'application/json',
			async : false,
			success : function(data) {
				alert(data);
			},
			error : function() {
				alert("ajax error");
			}
		});
	}, false);
</script>
<title>New Contact</title>
</head>
<body>
</body>
</html>